<template>
  <div>
    center
  </div>
</template>

<script>
export default {
  name: '',

  data () {
    return {
    }
  },

  methods: {
  },
  // 组件内的路由拦截
  beforeRouteEnter (to, from, next) {
    if (!localStorage.getItem('token')) {
      next('/login')
    } else {
      next()
    }
  },
  mounted () {
    // 检查是否有token 没有就重定向
    // if (!localStorage.getItem('token')) {
    //   this.$router.push('/login')
    // }
  }
}

</script>
<style scoped lang='less'>
</style>
